#include <iostream>
#include "smartptr.hpp"

int main()
{
    int *a = new int(2);
    mySharedPtr<int> ptr1(a);
    mySharedPtr<int> ptr2(ptr1);
    mySharedPtr<int> ptr3(new int(8));
    ptr3 = ptr1;

    std::cout << "*ptr1:" << *ptr1 << std::endl;
    std::cout << "*ptr2:" << *ptr2 << std::endl;
    std::cout << "*ptr3:" << *ptr3 << std::endl;
    *ptr1 = 12345;
    std::cout << "*ptr1:" << *ptr1 << std::endl;
    std::cout << "*ptr2:" << *ptr2 << std::endl;
    std::cout << "*ptr3:" << *ptr3 << std::endl;
}